home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7846 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: dawn.mmm.com!news
  2. From: kjhopps@mmm.com (Kevin J Hopps)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: novice question on copy constru
  5. Date: 19 Feb 1996 20:06:13 GMT
  6. Organization: 3M - St. Paul, MN  55144-1000 US
  7. Message-ID: <4gal7l$4q7@dawn.mmm.com>
  8. References: <AL9SoXAZfTHxEwVN@mics.demon.co.uk> <4g0et8$3h6$2@mhadg.production.compuserve.com>
  9. Reply-To: kjhopps@mmm.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. John Puopolo (102262.612@CompuServe.COM) wrote:
  13. > It is recommended that you always supply:
  14.  
  15. Always question absolute statements :-)
  16.  
  17. > A ctor
  18. > A dtor (virtual if approp)
  19. > A copy ctor
  20. > An assignment (=) operator
  21.  
  22. > For every non-trivial class that you implement.  Leave nothing to 
  23. > chance and you'll have far fewer headaches.  Been there... done 
  24. > that.  
  25.  
  26. I was about to disagree, citing classes for which I want copying to be
  27. illegal.  But then I realized that I still include these operations --
  28. I just make the copy operations private.
  29.  
  30. Maybe I'll have to rethink my absolute rejection of absolute statements :-)
  31. --
  32. Kevin J. Hopps                  e-mail: kjhopps@mmm.com
  33. 3M Company                      phone:  (612) 737-4643
  34. 3M Center, Bldg. 235-2D-57      fax:    (612) 737-2700
  35. St. Paul, MN 55144-1000         Opinions are my own.  I don't speak for 3M.
  36.     But 3M speaks for me -- I did not write the following line:
  37.  
  38. Opinions expressed herein are my own and may not represent those of 3M.
  39.